(GH-3236) Only set ruby env vars on local transport when they exist #3240
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Previously we would attempt to use any prior environment variables captured when bolt was invoked by simply looking for those existing. This works when those exist but in the case they did not exist the environment variables were set to empty strings. This makes it impossible to load ruby code (for example to do an apply on local transport). This commit updates the local transport to only set those environment variables if they are explicitly set to something other than an empty string.
!bug
Only set ruby env vars for local transport when non empty strings (#3236)
Previously when using bundled-ruby=false for the local transport and not expliclty setting ruby environment variables internal apply tasks did not work due to ruby code not being able to be loaded. Now the local transport only preserves ruby environment variables when they are set to something other than an empty string.